import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class P75 {
	public static void main(String[] args) {
		int c = 0;
		int num = 100;
		//int num = 150;
		Map<Long, Long> reversePowerMap = new HashMap<Long, Long>();
		//Map<Long, Long> powerMap = new HashMap<Long, Long>();
				
		long start = System.currentTimeMillis();
		for (long i = 1; i <= num; i++) {
			Long p = (long)Math.pow(i, 2);
			reversePowerMap.put(p, i);
			//powerMap.put(i, p);
		}
		
		System.out.println(System.currentTimeMillis() - start);
		
		System.out.println("------------");
		for (long i = 3; i < num; i++) {
			Set<String> set = new HashSet<String>();
			
			int xx = (int) ((double) i / ( 2 + Math.sqrt(2)));
	//		System.out.println("xx:" + xx);
			for (long j = 3; j <= xx; j++) {
				
				try {
					Thread.sleep(1000);	
				} catch (Exception e) {
					// TODO: handle exception
				}
				
				
//				System.out.println(">>>" + middle);
				long k = xx;
				long oldK = k;
				while (true) {
				
					
					
					long x = j * j;
					long y = k * k;
					
//					long sum = x + y;
//					long s = sum%10;
//					if (s == 2 || s == 3 || s == 7|| s == 8) {
//						continue;
//					}
					
					long z = (i - j - k) * (i - j - k);
					System.out.println(x + "," + y + "," + z);
					
					
					System.out.println(">>>" + k);
					if (z == x + y) {
						List<Long> list = new ArrayList<Long>();
						list.add(j);
						list.add(k);
						list.add(i - j - k);
						Collections.sort(list);
						set.add(list.toString());
						break;
					} else if ( z < x + y) {
						k -= (k - xx)/2;
					} else if ( z > x + y) {
						k += (i - j - k)/2;
					}
					if (oldK == k) {
						break;
					}
					
					
				}
			}
			
			if (set.size() == 1) {
				System.out.println(set);
				c++;
			}
			System.out.println(i);
		}
		
		System.out.println(">>>" + c);
	}
}
